package com.diaohw.platform.utility.uml.core.obj;

import com.diaohw.platform.utility.uml.core.enums.ClassTypeEnum;
import lombok.Data;

import java.util.Comparator;
import java.util.Set;
import java.util.TreeSet;

@Data
public class ClassBO {

    private String className;

    private ClassTypeEnum type;


    private boolean flag = true;

    private Set<FieldBO> fields = new TreeSet<>(Comparator.comparing(FieldBO::getName));
    private Set<MethodBO> methods = new TreeSet<>(Comparator.comparing(MethodBO::getName));

    public static ClassBO of(String className, ClassTypeEnum type) {
        ClassBO bo = new ClassBO();
        bo.className = className;
        bo.type = type;
        return bo;
    }



}
